package com.znf4.permission.server.impl;

import java.util.List;
import java.util.Map;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.znf4.permission.entity.Function;
import com.znf4.permission.entity.Role;
import com.znf4.permission.entity.UserRole;
import com.znf4.permission.mapper.PermissionMapper;
import com.znf4.permission.server.PermissionServer;

@Service
public class PermissionServerImpl implements PermissionServer {
	
	
	
	@Autowired
	private PermissionMapper permissionMapper ;
	
	

	public void addUserRole(UserRole userRole) {
		permissionMapper.addUserRole(userRole);
	}

	public List<Function> queryFunctionByRoleId(Map<String, String> map) {
		return permissionMapper.queryFunctionByRoleId(map);
	}

	public List<Role> queryRoleByUserId(Map<String, String> map) {
		return permissionMapper.queryRoleByUserId(map);
	}
	
	

	

	
	
	
	
	

}
